package Item_cart_li;

import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.GridLayoutManager;
import pojo.Businessman;
import Order.OrderWindow;

import javax.swing.*;
import javax.swing.border.TitledBorder;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Objects;

public class ItemsWindow extends JFrame {
    private JPanel item_window;
    private JButton btn2;
    private JButton btn1;
    private JPanel ItemList;
    private JPanel panelItem;
    private JButton commitbtn;
    private JPanel panelTop;
    private JLabel shopPhoto;
    private JPanel panelDown;
    private JLabel Item1;
    private JLabel Item2;
    private JLabel Item3;
    private JLabel Item4;
    private JLabel Item5;
    private JLabel Item6;
    private JLabel Item7;
    private JLabel Item8;
    private JLabel cart;
    private JButton Itembtn1;
    private JButton Itembtn2;
    private JButton Itembtn3;
    private JButton Itembtn4;
    private JButton Itembtn5;
    private JButton Itembtn6;
    private JButton Itembtn7;
    private JButton Itembtn8;
    private JButton cartbtn;
    private JPanel ItemPane1;
    private JPanel ItemPane2;
    private JPanel ItemPane3;
    private JPanel ItemPane4;
    private JPanel ItemPane5;
    private JPanel ItemPane6;
    private JPanel ItemPane7;
    private JPanel ItemPane8;
    private JButton decrease_Itembtn1;
    private JButton decrease_Itembtn2;
    private JButton decrease_Itembtn3;
    private JButton decrease_Itembtn4;
    private JButton decrease_Itembtn5;
    private JButton decrease_Itembtn6;
    private JButton decrease_Itembtn7;
    private JButton decrease_Itembtn8;
    private JButton ReturnBtn;
    private JLabel ItemPrice1;
    private JLabel ItemPrice2;
    private JLabel ItemPrice3;
    private JLabel ItemPrice4;
    private JLabel ItemPrice5;
    private JLabel ItemPrice6;
    private JLabel ItemPrice7;
    private JLabel ItemPrice8;
    private JLabel ItemNum1;
    private JLabel ItemNum2;
    private JLabel ItemNum3;
    private JLabel ItemNum4;
    private JLabel ItemNum5;
    private JLabel ItemNum6;
    private JLabel ItemNum7;
    private JLabel ItemNum8;

    //购物车逻辑
    private int[] ItemNumber;
    private Businessman local;
    private String[] ItemName = new String[]{"套餐1", "套餐2", "套餐3", "套餐4", "套餐5", "套餐6", "套餐7", "套餐8"};
    private double[] ItemPrice = new double[]{19.9, 19.9, 19.9, 19.9, 19.9, 19.9, 19.9, 19.9};
    //购物车窗口
    private JDialog dialog = new JDialog();

    //固定属性
    private final Color Itembtncolor = new Color(116, 118, 121);
    private final Color ItembtnForecolor1 = new Color(255, 255, 255);
    private final Dimension ItemListSize = new Dimension(125, 600);
    private final Dimension ItemListBtnSize = new Dimension(125, 50);
    private final Color ItemListBtncolor = new Color(205, 0, 6);
    private final Color Black = new Color(0, 0, 0);
    private final Dimension dia_labelSize = new Dimension(180, 40);
    private final Dimension dia_btnSize = new Dimension(50, 40);
    private final Dimension dia_PanelSize = new Dimension(300, 50);
    private final Dimension panelTopSize = new Dimension(450, 120);
    private final Dimension panelDownSize = new Dimension(450, 71);
    private final Dimension cartSize = new Dimension(280, 30);
    private final Dimension commitBtnSize = new Dimension(60, 30);

    //商品label大小
    private final Dimension Item = new Dimension(120, 50);


    public ItemsWindow(int id) {
        local = new Businessman(id);
        ItemName = local.getItem();
        ItemPrice = local.getItemPrice();

        //每次更新购物车
        ItemNumber = new int[]{0, 0, 0, 0, 0, 0, 0, 0};

        //设置画板长度
        panelTop.setMaximumSize(panelTopSize);
        panelTop.setMinimumSize(panelTopSize);
        panelTop.setPreferredSize(panelTopSize);
        //设置商家照片
        //看照片够不够长
        shopPhoto.setMaximumSize(panelTopSize);
        shopPhoto.setMinimumSize(panelTopSize);
        shopPhoto.setPreferredSize(panelTopSize);
        shopPhoto.setIcon(new ImageIcon(local.getImageIcon()));

        //设置左侧导航栏为垂直分布与大小
        ItemList.setLayout(new BoxLayout(ItemList, BoxLayout.Y_AXIS));
        ItemList.setMaximumSize(ItemListSize);
        ItemList.setMinimumSize(ItemListSize);
        ItemList.setPreferredSize(ItemListSize);
        ItemList.setBorder(BorderFactory.createLineBorder(Color.black, 2));
        //设置左侧导航栏按钮大小和样式
        btn1.setMaximumSize(ItemListBtnSize);
        btn1.setMinimumSize(ItemListBtnSize);
        btn1.setPreferredSize(ItemListBtnSize);
        btn2.setMaximumSize(ItemListBtnSize);
        btn2.setMinimumSize(ItemListBtnSize);
        btn2.setPreferredSize(ItemListBtnSize);
        btn1.setBackground(ItemListBtncolor);
        btn1.setForeground(Black);
        btn2.setBackground(ItemListBtncolor);
        btn2.setForeground(Black);
        //返回按钮设置
        ReturnBtn.setBackground(Itembtncolor);
        ReturnBtn.setForeground(ItembtnForecolor1);
        ReturnBtn.setBorder(BorderFactory.createLineBorder(Color.black));
        ReturnBtn.setMaximumSize(ItemListBtnSize);
        ReturnBtn.setMinimumSize(ItemListBtnSize);
        ReturnBtn.setPreferredSize(ItemListBtnSize);
        ReturnBtn.setVisible(false);
        //三个返回按钮监听
        ReturnBtn.addActionListener(e -> {
            System.out.println("返回商家页面");
            //visible?
        });

        //设置右侧
        //设置右侧商品区为垂直分布和商品大小
        panelItem.setLayout(new BoxLayout(panelItem, BoxLayout.Y_AXIS));
        Item1.setMaximumSize(Item);
        Item1.setMinimumSize(Item);
        Item1.setPreferredSize(Item);
        Item2.setMaximumSize(Item);
        Item2.setMinimumSize(Item);
        Item2.setPreferredSize(Item);
        Item3.setMaximumSize(Item);
        Item3.setMinimumSize(Item);
        Item3.setPreferredSize(Item);
        Item4.setMaximumSize(Item);
        Item4.setMinimumSize(Item);
        Item4.setPreferredSize(Item);
        Item5.setMaximumSize(Item);
        Item5.setMinimumSize(Item);
        Item5.setPreferredSize(Item);
        Item6.setMaximumSize(Item);
        Item6.setMinimumSize(Item);
        Item6.setPreferredSize(Item);
        Item7.setMaximumSize(Item);
        Item7.setMinimumSize(Item);
        Item7.setPreferredSize(Item);
        Item8.setMaximumSize(Item);
        Item8.setMinimumSize(Item);
        Item8.setPreferredSize(Item);
        //设置文本
        Item1.setText(ItemName[0]);
        Item2.setText(ItemName[1]);
        Item3.setText(ItemName[2]);
        Item4.setText(ItemName[3]);
        Item5.setText(ItemName[4]);
        Item6.setText(ItemName[5]);
        Item7.setText(ItemName[6]);
        Item8.setText(ItemName[7]);
        //设置文本颜色
        Item1.setForeground(Black);
        Item2.setForeground(Black);
        Item3.setForeground(Black);
        Item4.setForeground(Black);
        Item5.setForeground(Black);
        Item6.setForeground(Black);
        Item7.setForeground(Black);
        Item8.setForeground(Black);
        //设置文本居中
        Item1.setHorizontalAlignment(SwingConstants.CENTER);
        Item2.setHorizontalAlignment(SwingConstants.CENTER);
        Item3.setHorizontalAlignment(SwingConstants.CENTER);
        Item4.setHorizontalAlignment(SwingConstants.CENTER);
        Item5.setHorizontalAlignment(SwingConstants.CENTER);
        Item6.setHorizontalAlignment(SwingConstants.CENTER);
        Item7.setHorizontalAlignment(SwingConstants.CENTER);
        Item8.setHorizontalAlignment(SwingConstants.CENTER);
        //边界
        ItemPane1.setBorder(BorderFactory.createLineBorder(Color.black, 2));
        ItemPane2.setBorder(BorderFactory.createLineBorder(Color.black, 2));
        ItemPane3.setBorder(BorderFactory.createLineBorder(Color.black, 2));
        ItemPane4.setBorder(BorderFactory.createLineBorder(Color.black, 2));
        ItemPane5.setBorder(BorderFactory.createLineBorder(Color.black, 2));
        ItemPane6.setBorder(BorderFactory.createLineBorder(Color.black, 2));
        ItemPane7.setBorder(BorderFactory.createLineBorder(Color.black, 2));
        ItemPane8.setBorder(BorderFactory.createLineBorder(Color.black, 2));
        //价格文本
        ItemPrice1.setText("￥" + ItemPrice[0]);
        ItemPrice2.setText("￥" + ItemPrice[1]);
        ItemPrice3.setText("￥" + ItemPrice[2]);
        ItemPrice4.setText("￥" + ItemPrice[3]);
        ItemPrice5.setText("￥" + ItemPrice[4]);
        ItemPrice6.setText("￥" + ItemPrice[5]);
        ItemPrice7.setText("￥" + ItemPrice[6]);
        ItemPrice8.setText("￥" + ItemPrice[7]);
        //价格文本颜色
        ItemPrice1.setForeground(Black);
        ItemPrice2.setForeground(Black);
        ItemPrice3.setForeground(Black);
        ItemPrice4.setForeground(Black);
        ItemPrice5.setForeground(Black);
        ItemPrice6.setForeground(Black);
        ItemPrice7.setForeground(Black);
        ItemPrice8.setForeground(Black);
        //按钮
        Itembtn1.setBackground(Itembtncolor);
        Itembtn2.setBackground(Itembtncolor);
        Itembtn3.setBackground(Itembtncolor);
        Itembtn4.setBackground(Itembtncolor);
        Itembtn5.setBackground(Itembtncolor);
        Itembtn6.setBackground(Itembtncolor);
        Itembtn7.setBackground(Itembtncolor);
        Itembtn8.setBackground(Itembtncolor);
        Itembtn1.setForeground(ItembtnForecolor1);
        Itembtn2.setForeground(ItembtnForecolor1);
        Itembtn3.setForeground(ItembtnForecolor1);
        Itembtn4.setForeground(ItembtnForecolor1);
        Itembtn5.setForeground(ItembtnForecolor1);
        Itembtn6.setForeground(ItembtnForecolor1);
        Itembtn7.setForeground(ItembtnForecolor1);
        Itembtn8.setForeground(ItembtnForecolor1);
        decrease_Itembtn1.setBackground(Itembtncolor);
        decrease_Itembtn2.setBackground(Itembtncolor);
        decrease_Itembtn3.setBackground(Itembtncolor);
        decrease_Itembtn4.setBackground(Itembtncolor);
        decrease_Itembtn5.setBackground(Itembtncolor);
        decrease_Itembtn6.setBackground(Itembtncolor);
        decrease_Itembtn7.setBackground(Itembtncolor);
        decrease_Itembtn8.setBackground(Itembtncolor);
        decrease_Itembtn1.setForeground(ItembtnForecolor1);
        decrease_Itembtn2.setForeground(ItembtnForecolor1);
        decrease_Itembtn3.setForeground(ItembtnForecolor1);
        decrease_Itembtn4.setForeground(ItembtnForecolor1);
        decrease_Itembtn5.setForeground(ItembtnForecolor1);
        decrease_Itembtn6.setForeground(ItembtnForecolor1);
        decrease_Itembtn7.setForeground(ItembtnForecolor1);
        decrease_Itembtn8.setForeground(ItembtnForecolor1);
        //按钮中间的值的设置


        //右侧按钮事件
        Itembtn1.addActionListener(e -> {
            ItemNumber[0]++;
            ItemNum1.setText(String.valueOf(ItemNumber[0]));
        });
        Itembtn2.addActionListener(e -> {
            ItemNumber[1]++;
            ItemNum2.setText(String.valueOf(ItemNumber[1]));
        });
        Itembtn3.addActionListener(e -> {
            ItemNumber[2]++;
            ItemNum3.setText(String.valueOf(ItemNumber[2]));
        });
        Itembtn4.addActionListener(e -> {
            ItemNumber[3]++;
            ItemNum4.setText(String.valueOf(ItemNumber[3]));
        });
        Itembtn5.addActionListener(e -> {
            ItemNumber[4]++;
            ItemNum5.setText(String.valueOf(ItemNumber[4]));
        });
        Itembtn6.addActionListener(e -> {
            ItemNumber[5]++;
            ItemNum6.setText(String.valueOf(ItemNumber[5]));
        });
        Itembtn7.addActionListener(e -> {
            ItemNumber[6]++;
            ItemNum7.setText(String.valueOf(ItemNumber[6]));
        });
        Itembtn8.addActionListener(e -> {
            ItemNumber[7]++;
            ItemNum8.setText(String.valueOf(ItemNumber[7]));
        });
        decrease_Itembtn1.addActionListener(e -> {
            if (ItemNumber[0] > 0) {
                ItemNumber[0]--;
                ItemNum1.setText(String.valueOf(ItemNumber[0]));
            }
        });
        decrease_Itembtn2.addActionListener(e -> {
            if (ItemNumber[1] > 0) {
                ItemNumber[1]--;
                ItemNum2.setText(String.valueOf(ItemNumber[1]));
            }
        });
        decrease_Itembtn3.addActionListener(e -> {
            if (ItemNumber[2] > 0) {
                ItemNumber[2]--;
                ItemNum3.setText(String.valueOf(ItemNumber[2]));
            }
        });
        decrease_Itembtn4.addActionListener(e -> {
            if (ItemNumber[3] > 0) {
                ItemNumber[3]--;
                ItemNum4.setText(String.valueOf(ItemNumber[3]));
            }
        });
        decrease_Itembtn5.addActionListener(e -> {
            if (ItemNumber[4] > 0) {
                ItemNumber[4]--;
                ItemNum5.setText(String.valueOf(ItemNumber[4]));
            }
        });
        decrease_Itembtn6.addActionListener(e -> {
            if (ItemNumber[5] > 0) {
                ItemNumber[5]--;
                ItemNum6.setText(String.valueOf(ItemNumber[5]));
            }
        });
        decrease_Itembtn7.addActionListener(e -> {
            if (ItemNumber[6] > 0) {
                ItemNumber[6]--;
                ItemNum7.setText(String.valueOf(ItemNumber[6]));
            }
        });
        decrease_Itembtn8.addActionListener(e -> {
            if (ItemNumber[7] > 0) {
                ItemNumber[7]--;
                ItemNum8.setText(String.valueOf(ItemNumber[7]));
            }
        });

        //购物车栏
        panelDown.setMaximumSize(panelDownSize);
        panelDown.setMinimumSize(panelDownSize);
        panelDown.setPreferredSize(panelDownSize);
        panelDown.setBorder(BorderFactory.createLineBorder(Color.black, 2));
        cartbtn.setMaximumSize(cartSize);
        cartbtn.setMinimumSize(cartSize);
        cartbtn.setPreferredSize(cartSize);
        cartbtn.setBackground(Itembtncolor);
        cartbtn.setForeground(ItembtnForecolor1);
        commitbtn.setMaximumSize(commitBtnSize);
        commitbtn.setMinimumSize(commitBtnSize);
        commitbtn.setPreferredSize(commitBtnSize);
        commitbtn.setBackground(Itembtncolor);
        commitbtn.setForeground(ItembtnForecolor1);
        //购物车界面初始化
        dialog.setIconImage(new ImageIcon(Objects.requireNonNull(getClass().getResource("/images/cart.jpg"))).getImage());
        dialog.setLocationRelativeTo(panelItem); // 设置对话框相对于主面板的位置
        dialog.setSize(450, 300);
        dialog.setLayout(new BoxLayout(dialog.getContentPane(), BoxLayout.Y_AXIS));
        //弹出框
        cartbtn.addActionListener(e -> {
            //设置新面板dialogPanel
            JPanel dialogPanel = new JPanel();
            dialog.setContentPane(dialogPanel);
            dialogPanel.setSize(450, 300);
            dialogPanel.setLayout(new BoxLayout(dialogPanel, BoxLayout.Y_AXIS));
            //提示信息
            JLabel tip = new JLabel();
            tip.setText("点击‘查看/收起’按钮可以更新购物车信息");
            tip.setBorder(BorderFactory.createLineBorder(Color.black, 2));
            tip.setBackground(Itembtncolor);
            tip.setForeground(Color.black);
            tip.setHorizontalAlignment(SwingConstants.CENTER);
            tip.setMaximumSize(new Dimension(300, 20));
            tip.setMinimumSize(new Dimension(300, 20));
            tip.setPreferredSize(new Dimension(300, 20));
            dialogPanel.add(tip);
            //循环实现
            for (int i = 0; i < ItemNumber.length; i++) {
                if (ItemNumber[i] != 0) {
                    //总面板
                    JPanel ItemPanel = new JPanel();
                    ItemPanel.setSize(Item);
                    //设置文本
                    JLabel ItemLabel = new JLabel();
                    ItemLabel.setText(ItemName[i] + ":     " + ItemNumber[i] + "  个");
                    ItemLabel.setHorizontalAlignment(SwingConstants.CENTER);
                    ItemLabel.setBackground(Itembtncolor);
                    ItemLabel.setForeground(Black);
                    ItemLabel.setBorder(BorderFactory.createLineBorder(Color.black, 2));
                    ItemLabel.setMaximumSize(dia_labelSize);
                    ItemLabel.setMinimumSize(dia_labelSize);
                    ItemLabel.setPreferredSize(dia_labelSize);
                    //设置button
                    JButton decrease_ItemButton = new JButton();
                    decrease_ItemButton.setText("-");
                    decrease_ItemButton.setBackground(Itembtncolor);
                    decrease_ItemButton.setForeground(ItembtnForecolor1);
                    decrease_ItemButton.setMaximumSize(dia_btnSize);
                    decrease_ItemButton.setMinimumSize(dia_btnSize);
                    decrease_ItemButton.setPreferredSize(dia_btnSize);
                    JButton add_ItemButton = new JButton();
                    add_ItemButton.setText("+");
                    add_ItemButton.setBackground(Itembtncolor);
                    add_ItemButton.setForeground(ItembtnForecolor1);
                    add_ItemButton.setMaximumSize(dia_btnSize);
                    add_ItemButton.setMinimumSize(dia_btnSize);
                    add_ItemButton.setPreferredSize(dia_btnSize);

                    //同步代码
                    int finalI = i;
                    decrease_ItemButton.addActionListener(new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                            if (ItemNumber[finalI] > 0) {
                                ItemNumber[finalI]--;
                                ItemLabel.setText(ItemName[finalI] + ":     " + ItemNumber[finalI] + "  个");
                            }
                            // 在按钮点击事件中调用repaintPanel方法
                            repaintPanel();
                        }
                    });
//                    decrease_ItemButton.addActionListener(e1->{
//                        ItemNumber[finalI]--;
//                        ItemLabel.setText(ItemName[finalI]+":     "+ItemNumber[finalI]+"  个");
//                        repaintPanel();
//                    });
                    add_ItemButton.addActionListener(e1 -> {
                        ItemNumber[finalI]++;
                        ItemLabel.setText(ItemName[finalI] + ":     " + ItemNumber[finalI] + "  个");
                        repaintPanel();
                    });
                    //设置画板
                    ItemPanel.add(ItemLabel);
                    ItemPanel.add(decrease_ItemButton);
                    ItemPanel.add(add_ItemButton);
                    ItemPanel.setMaximumSize(dia_PanelSize);
                    ItemPanel.setMinimumSize(dia_PanelSize);
                    ItemPanel.setPreferredSize(dia_PanelSize);
                    dialogPanel.add(ItemPanel);
                }
            }
            //必须要先生成再显示模板
            dialog.setVisible(!dialog.isVisible());
            revalidate();
            repaint();
        });
        commitbtn.addActionListener(e -> {
            System.out.println("提交了");
            int num = 0, sum = 0;
            String chosenItem[] = new String[8];
            double chosenItemPrice[] = new double[8];
            int chosenItemNum[] = new int[8];
            for (int i = 0; i < ItemNumber.length; i++) {
                if (ItemNumber[i] != 0) {
                    chosenItem[num] = ItemName[i];
                    chosenItemPrice[num] = ItemPrice[i];
                    chosenItemNum[num] = ItemNumber[i];
                    num++;
                }
                ;
            }
            String data[][] = new String[num][4];
            for (int i = 0; i < num; i++) {
                data[i][0] = local.getName();
                data[i][1] = chosenItem[i];
                data[i][2] = "￥" + String.valueOf(chosenItemPrice[i]);
                data[i][3] = String.valueOf(chosenItemNum[i]);
                sum += chosenItemPrice[i] * chosenItemNum[i];
            }
            OrderWindow orderWindow = new OrderWindow();
            orderWindow.setTable(data);
            orderWindow.setTotalPrice(sum);
            JFrame orderFrame = new JFrame();
            orderFrame.setTitle("订单");
            orderFrame.setSize(450, 600);
            orderFrame.setResizable(false);
            orderFrame.setContentPane(orderWindow.getMainPanel());
            orderFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
            // 显示窗口
            orderFrame.setVisible(true);
        });

    }

    public void repaintPanel() {
        this.removeAll();
        this.revalidate();
        this.repaint();
    }

    public JPanel getItem_window() {
        return item_window;
    }

    public static void main(String[] args) {
//        设置Frame
        JFrame jFrame = new JFrame();
        jFrame.setTitle("塔斯汀");
        jFrame.setIconImage(new ImageIcon(Objects.requireNonNull(ItemsWindow.class.getResource("/images/tasiting.jpg"))).getImage());
        jFrame.setSize(new Dimension(450, 700));
        jFrame.setResizable(false); // 禁止调整大小
        //设置主窗口
        int id = 0;
        ItemsWindow window = new ItemsWindow(0);
        jFrame.setContentPane(window.item_window);
        jFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        //显示
        jFrame.setVisible(true);
    }

    {
// GUI initializer generated by IntelliJ IDEA GUI Designer
// >>> IMPORTANT!! <<<
// DO NOT EDIT OR ADD ANY CODE HERE!
        $$$setupUI$$$();
    }

    /**
     * Method generated by IntelliJ IDEA GUI Designer
     * >>> IMPORTANT!! <<<
     * DO NOT edit this method OR call it in your code!
     *
     * @noinspection ALL
     */
    private void $$$setupUI$$$() {
        item_window = new JPanel();
        item_window.setLayout(new GridBagLayout());
        item_window.setForeground(new Color(-11381671));
        panelItem = new JPanel();
        panelItem.setLayout(new GridLayoutManager(8, 2, new Insets(5, 5, 5, 5), -1, -1));
        GridBagConstraints gbc;
        gbc = new GridBagConstraints();
        gbc.gridx = 2;
        gbc.gridy = 2;
        gbc.gridheight = 13;
        gbc.weighty = 1.0;
        gbc.fill = GridBagConstraints.BOTH;
        item_window.add(panelItem, gbc);
        ItemPane1 = new JPanel();
        ItemPane1.setLayout(new GridLayoutManager(2, 5, new Insets(0, 0, 0, 0), -1, -1));
        ItemPane1.setBackground(new Color(-2104859));
        panelItem.add(ItemPane1, new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
        Itembtn1 = new JButton();
        Itembtn1.setText("+");
        ItemPane1.add(Itembtn1, new GridConstraints(0, 4, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        Item1 = new JLabel();
        Item1.setBackground(new Color(-3342330));
        Item1.setForeground(new Color(-16777216));
        Item1.setText("汉堡套餐1");
        ItemPane1.add(Item1, new GridConstraints(0, 0, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        decrease_Itembtn1 = new JButton();
        decrease_Itembtn1.setText("-");
        ItemPane1.add(decrease_Itembtn1, new GridConstraints(0, 2, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemPrice1 = new JLabel();
        ItemPrice1.setText("");
        ItemPane1.add(ItemPrice1, new GridConstraints(0, 1, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemNum1 = new JLabel();
        ItemNum1.setText("");
        ItemPane1.add(ItemNum1, new GridConstraints(0, 3, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemPane2 = new JPanel();
        ItemPane2.setLayout(new GridLayoutManager(2, 5, new Insets(0, 0, 0, 0), -1, -1));
        ItemPane2.setBackground(new Color(-2104859));
        panelItem.add(ItemPane2, new GridConstraints(1, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
        Itembtn2 = new JButton();
        Itembtn2.setText("+");
        ItemPane2.add(Itembtn2, new GridConstraints(0, 4, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        Item2 = new JLabel();
        Item2.setBackground(new Color(-3342330));
        Item2.setForeground(new Color(-16777216));
        Item2.setText("汉堡套餐2");
        ItemPane2.add(Item2, new GridConstraints(0, 0, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        decrease_Itembtn2 = new JButton();
        decrease_Itembtn2.setText("-");
        ItemPane2.add(decrease_Itembtn2, new GridConstraints(0, 2, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemPrice2 = new JLabel();
        ItemPrice2.setText("");
        ItemPane2.add(ItemPrice2, new GridConstraints(0, 1, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemNum2 = new JLabel();
        ItemNum2.setText("");
        ItemPane2.add(ItemNum2, new GridConstraints(0, 3, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemPane3 = new JPanel();
        ItemPane3.setLayout(new GridLayoutManager(2, 5, new Insets(0, 0, 0, 0), -1, -1));
        ItemPane3.setBackground(new Color(-2104859));
        panelItem.add(ItemPane3, new GridConstraints(2, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
        Itembtn3 = new JButton();
        Itembtn3.setText("+");
        ItemPane3.add(Itembtn3, new GridConstraints(0, 4, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        Item3 = new JLabel();
        Item3.setBackground(new Color(-3342330));
        Item3.setForeground(new Color(-16777216));
        Item3.setText("汉堡套餐3");
        ItemPane3.add(Item3, new GridConstraints(0, 0, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        decrease_Itembtn3 = new JButton();
        decrease_Itembtn3.setText("-");
        ItemPane3.add(decrease_Itembtn3, new GridConstraints(0, 2, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemPrice3 = new JLabel();
        ItemPrice3.setText("");
        ItemPane3.add(ItemPrice3, new GridConstraints(0, 1, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemNum3 = new JLabel();
        ItemNum3.setText("");
        ItemPane3.add(ItemNum3, new GridConstraints(0, 3, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemPane4 = new JPanel();
        ItemPane4.setLayout(new GridLayoutManager(2, 5, new Insets(0, 0, 0, 0), -1, -1));
        ItemPane4.setBackground(new Color(-2104859));
        panelItem.add(ItemPane4, new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
        Itembtn4 = new JButton();
        Itembtn4.setText("+");
        ItemPane4.add(Itembtn4, new GridConstraints(0, 4, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        Item4 = new JLabel();
        Item4.setForeground(new Color(-16777216));
        Item4.setText("汉堡套餐4");
        ItemPane4.add(Item4, new GridConstraints(0, 0, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        decrease_Itembtn4 = new JButton();
        decrease_Itembtn4.setText("-");
        ItemPane4.add(decrease_Itembtn4, new GridConstraints(0, 2, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemPrice4 = new JLabel();
        ItemPrice4.setText("");
        ItemPane4.add(ItemPrice4, new GridConstraints(0, 1, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemNum4 = new JLabel();
        ItemNum4.setText("");
        ItemPane4.add(ItemNum4, new GridConstraints(0, 3, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemPane5 = new JPanel();
        ItemPane5.setLayout(new GridLayoutManager(3, 5, new Insets(0, 0, 0, 0), -1, -1));
        ItemPane5.setBackground(new Color(-2104859));
        panelItem.add(ItemPane5, new GridConstraints(4, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
        Itembtn5 = new JButton();
        Itembtn5.setText("+");
        ItemPane5.add(Itembtn5, new GridConstraints(0, 4, 3, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        Item5 = new JLabel();
        Item5.setForeground(new Color(-16777216));
        Item5.setText("汉堡套餐5");
        ItemPane5.add(Item5, new GridConstraints(0, 0, 3, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        decrease_Itembtn5 = new JButton();
        decrease_Itembtn5.setText("-");
        ItemPane5.add(decrease_Itembtn5, new GridConstraints(0, 2, 3, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemPrice5 = new JLabel();
        ItemPrice5.setText("");
        ItemPane5.add(ItemPrice5, new GridConstraints(0, 1, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemNum5 = new JLabel();
        ItemNum5.setText("");
        ItemPane5.add(ItemNum5, new GridConstraints(0, 3, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemPane6 = new JPanel();
        ItemPane6.setLayout(new GridLayoutManager(2, 5, new Insets(0, 0, 0, 0), -1, -1));
        ItemPane6.setBackground(new Color(-2104859));
        panelItem.add(ItemPane6, new GridConstraints(5, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
        Itembtn6 = new JButton();
        Itembtn6.setText("+");
        ItemPane6.add(Itembtn6, new GridConstraints(0, 4, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        Item6 = new JLabel();
        Item6.setForeground(new Color(-16777216));
        Item6.setText("汉堡套餐6");
        ItemPane6.add(Item6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        decrease_Itembtn6 = new JButton();
        decrease_Itembtn6.setText("-");
        ItemPane6.add(decrease_Itembtn6, new GridConstraints(0, 2, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemPrice6 = new JLabel();
        ItemPrice6.setText("");
        ItemPane6.add(ItemPrice6, new GridConstraints(0, 1, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemNum6 = new JLabel();
        ItemNum6.setText("");
        ItemPane6.add(ItemNum6, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemPane7 = new JPanel();
        ItemPane7.setLayout(new GridLayoutManager(2, 5, new Insets(0, 0, 0, 0), -1, -1));
        ItemPane7.setBackground(new Color(-2104859));
        panelItem.add(ItemPane7, new GridConstraints(6, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
        Itembtn7 = new JButton();
        Itembtn7.setText("+");
        ItemPane7.add(Itembtn7, new GridConstraints(0, 4, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        Item7 = new JLabel();
        Item7.setForeground(new Color(-16777216));
        Item7.setText("汉堡套餐7");
        ItemPane7.add(Item7, new GridConstraints(0, 0, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        decrease_Itembtn7 = new JButton();
        decrease_Itembtn7.setText("-");
        ItemPane7.add(decrease_Itembtn7, new GridConstraints(0, 2, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemPrice7 = new JLabel();
        ItemPrice7.setText("");
        ItemPane7.add(ItemPrice7, new GridConstraints(0, 1, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemNum7 = new JLabel();
        ItemNum7.setText("");
        ItemPane7.add(ItemNum7, new GridConstraints(0, 3, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemPane8 = new JPanel();
        ItemPane8.setLayout(new GridLayoutManager(2, 5, new Insets(0, 0, 0, 0), -1, -1));
        ItemPane8.setBackground(new Color(-2104859));
        panelItem.add(ItemPane8, new GridConstraints(7, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
        Itembtn8 = new JButton();
        Itembtn8.setText("+");
        ItemPane8.add(Itembtn8, new GridConstraints(0, 4, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        Item8 = new JLabel();
        Item8.setForeground(new Color(-16777216));
        Item8.setText("汉堡套餐8");
        ItemPane8.add(Item8, new GridConstraints(0, 0, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        decrease_Itembtn8 = new JButton();
        decrease_Itembtn8.setText("-");
        ItemPane8.add(decrease_Itembtn8, new GridConstraints(0, 2, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemPrice8 = new JLabel();
        ItemPrice8.setText("");
        ItemPane8.add(ItemPrice8, new GridConstraints(0, 1, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemNum8 = new JLabel();
        ItemNum8.setText("");
        ItemPane8.add(ItemNum8, new GridConstraints(0, 3, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        panelTop = new JPanel();
        panelTop.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 0;
        gbc.gridwidth = 3;
        gbc.gridheight = 2;
        gbc.weightx = 1.0;
        gbc.fill = GridBagConstraints.BOTH;
        item_window.add(panelTop, gbc);
        panelTop.setBorder(BorderFactory.createTitledBorder(null, "", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
        shopPhoto = new JLabel();
        shopPhoto.setText("");
        panelTop.add(shopPhoto);
        panelDown = new JPanel();
        panelDown.setLayout(new GridLayoutManager(1, 3, new Insets(5, 5, 5, 5), -1, -1));
        gbc = new GridBagConstraints();
        gbc.gridx = 1;
        gbc.gridy = 15;
        gbc.gridwidth = 2;
        gbc.weightx = 1.0;
        gbc.fill = GridBagConstraints.BOTH;
        item_window.add(panelDown, gbc);
        commitbtn = new JButton();
        commitbtn.setText("提交");
        panelDown.add(commitbtn, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        cart = new JLabel();
        cart.setBackground(new Color(-3342330));
        cart.setForeground(new Color(-16777216));
        cart.setText("购物车");
        panelDown.add(cart, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        cartbtn = new JButton();
        cartbtn.setText("查看/收起");
        panelDown.add(cartbtn, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ItemList = new JPanel();
        ItemList.setLayout(new GridLayoutManager(3, 1, new Insets(5, 5, 5, 5), -1, -1));
        ItemList.setBackground(new Color(-2104859));
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 2;
        gbc.gridwidth = 2;
        gbc.gridheight = 13;
        item_window.add(ItemList, gbc);
        btn1 = new JButton();
        btn1.setBackground(new Color(-3342330));
        btn1.setEnabled(true);
        btn1.setText("_限时特惠_");
        ItemList.add(btn1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        btn2 = new JButton();
        btn2.setText("商品精选");
        ItemList.add(btn2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
        ReturnBtn = new JButton();
        ReturnBtn.setText("返回");
        ItemList.add(ReturnBtn, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    }

    /**
     * @noinspection ALL
     */
    public JComponent $$$getRootComponent$$$() {
        return item_window;
    }
}
